﻿package AssetClass
{
	import base.BaseAsset;
	
	import com.dusk.net.AssetLoader;
	
	import com.game.manager.GameSceneManager;
	
	import export.pet.PetInterface;
	
	import flash.events.Event;
	
	public class RolePetInter extends BaseAsset
	{
		public function RolePetInter():void
		{
			super(PetInterface);
		}
		
		private var targetRole:*;
		
		public function setRole(param1:*):void
		{
			this.targetRole = param1;
			super.loadAssets("RolePet");
		}
		
		protected override function __onComplete(param1:Event = null):void
		{
			var _loc1_:PetInterface = new this.targetClass();
			_loc1_.setRole(this.targetRole);
			GameSceneManager.getIns().addScene(_loc1_);
			AssetLoader.getIns().removeEventListener(AssetLoader.ALL_LOAD_COMPLETE, __onComplete);
			AssetLoader.getIns().removeEventListener(AssetLoader.LOAD_FAILED, __onFailed);
			destroy();
		}
	}
}